package com.bhs.sansonglogistics.ui.waybill;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TextView;

import com.bhs.sansonglogistics.R;
import com.bhs.sansonglogistics.base.BaseActivity;
import com.bhs.sansonglogistics.bean.LocationHistoryBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

/**
 * 货车定位 历史记录
 */
public class TruckPositioningHistoryActivity extends BaseActivity {
    private SwipeRefreshLayout mRefreshLayout;
    private RecyclerView mRvList;
    private BaseQuickAdapter<LocationHistoryBean, BaseViewHolder> mAdapter;

    @Override
    public int initLayout() {
        return R.layout.activity_truck_positioning_history;
    }

    @Override
    public void initView() {
        TextView mTvTitle = findViewById(R.id.tv_title);
        mTvTitle.setText("历史记录");
        mRefreshLayout = findViewById(R.id.refreshLayout);
        mRvList = findViewById(R.id.rv_list);
    }

    @Override
    public void initData() {
        mAdapter=new BaseQuickAdapter<LocationHistoryBean, BaseViewHolder>(R.layout.item_location_history) {
            @Override
            protected void convert(@NonNull BaseViewHolder helper, LocationHistoryBean item) {

            }
        };
        mRvList.setAdapter(mAdapter);
        mRvList.setLayoutManager(new LinearLayoutManager(mContext));
        mAdapter.setEmptyView(LayoutInflater.from(mActivity).inflate(R.layout.layout_empty, null));
    }
}